package com.qidianit.mes.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @ author: 周晓轩
 * @ company 起点编程
 * @ time: 2025/9/20 - 14:09
 * @ Description:
 */
@Data
@TableName("production_order")
public class ProductOrder {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("production_order_code")
    private String productionOrderCode;

    @TableField("production_order_name")
    private String productionOrderName;

    @TableField("production_order_source")
    private Integer productionOrderSource;

    @TableField("production_order_type")
    private Long productionOrderType;

    @TableField("order_code")
    private String orderCode;

    @TableField("material_code")
    private String materialCode;

    @TableField("production_order_quantity")
    private Integer productionOrderQuantity;

    @TableField("customer_code")
    private String customerCode;

    @TableField("request_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate requestDate;

    private Long status;

    @TableField("qr_code_url")
    private String qrCodeUrl;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField("creator_id")
    private Long creatorId;

    @TableField("updator_id")
    private Long updatorId;

    @TableField("delete_flag")
    private Integer deleteFlag;

    @TableField(exist = false)
    private Customer customer;

    @TableField(exist = false)
    private Material material;

    @TableField(exist = false)
    private SysDictData statusDictData;

    @TableField(exist = false)
    private String customerName;

    @TableField("audit_opinion")
    private String auditOpinion;
}